package com.zhangzhan.gulimallproduct.dao;

import com.zhangzhan.gulimallproduct.entity.SkuInfoEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * sku信息
 * 
 * @author zhangzhan
 * @email sunlightcs@gmail.com
 * @date 2024-06-12 16:45:44
 */
@Mapper
public interface SkuInfoDao extends BaseMapper<SkuInfoEntity> {

    @Select("select concat(attr_name, '：', attr_value)\n" +
            "from pms_sku_sale_attr_value where sku_id = #{skuId} ")
    List<String> skuAttrs(@Param("skuId") Long skuId);
}
